<template>
  <div>
    <el-container>
      <el-header><Header /></el-header>
      <el-main>
        <div>
          <el-menu
            :default-active="activeIndex ? activeIndex : '1'"
            class="el-menu-demo"
            mode="horizontal"
          >
            <el-menu-item
              style="border: none"
              index="1"
              ><router-link to="/Register/PersonalRegister"
                >专技人才注册</router-link
              ></el-menu-item
            >
            <el-menu-item
              style="border: none"
              index="2"
              ><router-link to="/Register/CompanyRegister"
                >用人单位注册</router-link
              ></el-menu-item
            >
          </el-menu>
        </div>
        <div class="stepBox">
          <el-steps align-center>
            <el-step
              status="finish"
              title="提交注册信息"
              icon="el-icon-loading"
            ></el-step>
            <el-step status="finish" title="提交注册"></el-step>
            <el-step status="finish" title="等待所属单位审批"></el-step>
            <el-step status="finish" title="注册成功"></el-step>
          </el-steps>
        </div>
        <div id="view">
          <router-view></router-view>
        </div>
      </el-main>
    </el-container>
  </div>
</template>
<script>
import Header from "../../../components/Header.vue";
export default {
  name: "Home",
  data() {
    return {
      activeIndex: "1"
    };
  },
  components: {
    Header,
  },
  mounted(){
    this.activeIndex = sessionStorage.getItem("RegisterIndex")?sessionStorage.getItem("RegisterIndex"):"1";
  },
  updated() {
    this.activeIndex = sessionStorage.getItem("RegisterIndex");
  }
};
</script>
<style lang="less" scoped>
  .el-main {
    height: 100%;
    width: 90%;
    margin: 0 5%;
  }
  #app > div {
    height: 100%;
  }
  .el-header {
    padding: 0;
  }
  .el-main {
    background-color: #fff;
    color: #333;
    text-align: center;
  }
  .el-menu-demo {
    border-bottom: none !important;
  }
  .el-menu-demo {
    li {
      transition: none;
      width: 50%;
      border-bottom: 1px solid rgb(201, 201, 201) !important;
      a {
        display: inline-block;
        width: 100%;
        height: 100%;
      }
    }
    li.is-active {
      border: 1px solid rgb(201, 201, 201) !important;
      border-bottom: none !important;
    }
  }
  .stepBox {
    margin-top: 40px;
  }
</style>